﻿using Microsoft.Practices.Prism.Commands;
using Microsoft.Practices.Prism.Regions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace Ezpay.UI.ViewModels
{
    class MenuItemViewModel
    {
        private string _path;
        private IRegionManager _regionManager;
        public MenuItemViewModel(string content, string path, IRegionManager regionManager)
        {
            _path = path;
            Content = content;
            _regionManager = regionManager;
            Command = new DelegateCommand(Navigate);
        }

        private void Navigate()
        {
            _regionManager.ShowInMain(_path);
        }
        public string Content { get; set; }
        public ICommand Command { get; set; }
    }
    class MenuViewModel
    {
        public string Title { get; set; }
        public List<MenuItemViewModel> Items { get; set; }
    }
}
